ui_print("Quectel FOTA Tools
  Version
     v4.1 : Full upgrade supports upgrading specified partitions
");
ui_print("Patching system files...");
assert(apply_patch_check("/tmp/multifota.bin", "8decd76a32bc6c2caba28d840f155c1435dcf0f6"));
set_progress(0.000000);
unmount("/system/firmware");
write_raw_image(package_extract_file("full-images/sdxnightjar-boot.img"), "boot");
check_partition_sha1("MTD:boot:8132608:0ceaeeae600b1ee747a619b77c943a1135abcaf3");
set_progress(0.105874);
unmount("/system");
write_raw_image(package_extract_file("full-images/sdxnightjar-sysfs.ubi"), "system");
check_partition_sha1("MTD:system:68681728:8eabf789aa95f644a2f0377a6baf8082a8703c92");
set_progress(1.000000);
ui_print("Upgrade finished!!!");
